﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Functionalitys.aspx.cs" Inherits="AspNetTraining.Functionalitys" %>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="gvFunctionalitys"  runat="server" Width="855px" BorderStyle="Solid"
        ShowFooter="True" CellPadding="4" ForeColor="#333333"   GridLines="Both" AutoGenerateColumns="False" Height="195px">
        
        <Columns>
          <asp:TemplateField HeaderText="FunctionID">
              <ItemTemplate>
                  <asp:Label ID="lblFunctionID" runat="server"
                                  Text='<%#Eval("FunctionID")%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>
                    <asp:TemplateField HeaderText="Function Name">
              <ItemTemplate>
                  <asp:Label ID="lblFunctionName" runat="server"
                                  Text='<%#Eval("FunctionName")%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>
            <asp:TemplateField HeaderText="ParentID">
              <ItemTemplate>
                  <asp:Label ID="lblParentID" runat="server"
                                  Text='<%#Eval("ParentID")%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>
          <asp:TemplateField HeaderText="Level">
              <ItemTemplate>
                  <asp:Label ID="lblLevel" runat="server"
                                  Text='<%#Eval("Level")%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>         
           <asp:TemplateField HeaderText="CreatedOn">
              <ItemTemplate>
                  <asp:Label ID="lblCreatedOn" runat="server"
                                  Text='<%#String.Format("{0:MM/dd/yy}", Eval("CreatedOn"))%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>
           <asp:TemplateField HeaderText="CreatedBy">
              <ItemTemplate>
                  <asp:Label ID="lblCreatedBy" runat="server"
                                  Text='<%#GetUserNameByID(Eval("CreatedBy"))%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>
           <asp:TemplateField HeaderText="ModifiedOn">
              <ItemTemplate>
                  <asp:Label ID="lblModifiedOn" runat="server"
                                  Text='<%#String.Format("{0:MM/dd/yy}", Eval("ModifiedOn"))%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>
           <asp:TemplateField HeaderText="ModifiedBy">
              <ItemTemplate>
                  <asp:Label ID="lblModifiedBy" runat="server"
                                  Text='<%#GetUserNameByID(Eval("ModifiedBy"))%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>         
           <asp:TemplateField HeaderText="Description">
              <ItemTemplate>
                  <asp:Label ID="lblDescription" runat="server"
                                  Text='<%#Eval("Description")%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>
           <asp:TemplateField HeaderText="Active">
              <ItemTemplate>
                  <asp:Label ID="lblActive" runat="server"
                                  Text='<%#Eval("Active")%>'></asp:Label>
              </ItemTemplate>
          </asp:TemplateField>
          <asp:TemplateField>
              <ItemTemplate>
                   <asp:CheckBox ID="chkDelete" runat="server"  />
                   <a ID="hlEdit"   href="FunctionalityDetail.aspx?id=<%# Eval("FunctionID") %>">Edit</a>                 
                   <a ID="hlDelete" onclick='<%# "return confirm(\"Are you want delete account ?\");" %>'   href="Functionalitys.aspx?id=<%# Eval("FunctionID") %>">Delete</a>                                        
              </ItemTemplate>
          </asp:TemplateField>   
      </Columns>  
    </asp:GridView>
        <div>
            <a ID="hlCreateNew"  href="GroupUserDetail.aspx">Create New</a>
            <asp:LinkButton runat="server" Text="Delete Choose" OnClick="DeleteChoose_Click" OnClientClick='return confirm(\"Are you want delete account selected ?\");'></asp:LinkButton>
         </div>
</asp:Content>
